import { createRouter, createWebHistory } from 'vue-router'
import LayoutView from '@/views/LayoutView.vue'

const routes = [
  {
    path: '/',
    name: 'layout',
    component: LayoutView,
    redirect: { name: "xiaoqu" },
    children: [
      {
        path: "xiaoqu",
        name: "xiaoqu",
        component: () => import("@/views/xiaoqu/XiaoQu.vue"),
        arr:["小区管理"]
      },
      {
        path: "mendian",
        name: "mendian",
        component: () => import("@/views/bangmai/MenDian.vue"),
        arr:["帮买取快递废品回收","门店管理"]
      },
      {
        path: "yizhan",
        name: "yizhan",
        component: () => import("@/views/bangmai/YiZhan.vue"),
        arr:["帮买取快递废品回收","驿站管理"]
      },
      {
        path:"shangpin",
        name:"shangpin",
        component:()=> import("@/views/bangmai/ShangPin.vue"),
        arr:["帮买取快递废品回收","商品管理"]
      },
      {
        path:"dingdan",
        name:"dingdan",
        component:()=> import("@/views/bangmai/DingDan.vue"),
        arr:["帮买取快递废品回收","订单管理"]
      },
      {
        path:"feipin",
        name:"feipin",
        component:()=> import("@/views/bangmai/FeiPin.vue"),
        arr:["帮买取快递废品回收","废品回收订单"]
      },
      {
        path:"qishou",
        name:"qishou",
        component:()=> import("@/views/qishou/QiShou.vue"),
        arr:["骑手管理"]
      },
      {
        path:"article",
        name:"article",
        component:()=> import("@/views/jzx/JzxArticle.vue"),
        arr:["jzx","文章管理"]
      },
      {
        path:"course",
        name:"course",
        component:()=> import("@/views/jzx/JzxCourse.vue"),
        arr:["jzx","课程管理"]
      },
      {
        path:"FM",
        name:"FM",
        component:()=> import("@/views/jzx/JzxFm.vue"),
        arr:["jzx","FM管理"]
      },
      {
        path:"courseReview",
        name:"courseReview",
        component:()=> import("@/views/jzx/JzxCourseReview.vue"),
        arr:["jzx","FM管理"]
      },
      {
        path:"psychologicalAssessment",
        name:"psychologicalAssessment",
        component:()=> import("@/views/jzx/JzxPsychologicalAssessment.vue"),
        arr:["jzx","心理测评管理"]
      },
      {
        path:"psychologicalKnowledge",
        name:"psychologicalKnowledge",
        component:()=> import("@/views/jzx/JzxPsychologicalKnowledge.vue"),
        arr:["jzx","心理知识管理"]
      },
      {
        path:"publicWelfare",
        name:"publicWelfare",
        component:()=> import("@/views/jzx/JzxPublicWelfare.vue"),
        arr:["jzx","公益中心管理"]
      },
      {
        path:"company",
        name:"company",
        component:()=> import("@/views/zhy/ZhyCompany.vue"),
        arr:["zhy","公司管理"]
      },
      {
        path:"announcement",
        name:"announcement",
        component:()=> import("@/views/zhy/ZhyAnnouncement.vue"),
        arr:["zhy","咨询公告管理"]
      },
      {
        path:"consultationAppointment",
        name:"consultationAppointment",
        component:()=> import("@/views/zhy/ConsultationAppointment.vue"),
        arr:["zhy","咨询预约管理"]
      },
      {
        path:"homeCarousel",
        name:"homeCarousel",
        component:()=> import("@/views/zhy/HomCarousel.vue"),
        arr:["zhy","首页轮播图管理"]
      },
      {
        path:"question",
        name:"question",
        component:()=> import("@/views/zhy/ZhyQuestion.vue"),
        arr:["zhy","问题管理"]
      },
      {
        path:"reply",
        name:"reply",
        component:()=> import("@/views/zhy/ZhyReply.vue"),
        arr:["zhy","回复管理"]
      },
      {
        path:"consultant",
        name:"consultant",
        component:()=> import("@/views/ytq/YtqConsultant.vue"),
        arr:["ytq","咨询师"]
      },
      {
        path:"consultantLevel",
        name:"consultantLevel",
        component:()=> import("@/views/ytq/ConsultantLevel.vue"),
        arr:["ytq","咨询师等级"]
      },
      {
        path:"answerLeaveWord",
        name:"answerLeaveWord",
        component:()=> import("@/views/ytq/AnswerLeaveWord.vue"),
        arr:["ytq","回复留言"]
      },
      {
        path:"feeStandards",
        name:"feeStandards",
        component:()=> import("@/views/ytq/FeeStandards.vue"),
        arr:["ytq","收费标准"]
      },
      {
        path:"fieldOfExcellence",
        name:"fieldOfExcellence",
        component:()=> import("@/views/ytq/FieldOfExcellence.vue"),
        arr:["ytq","擅长领域"]
      },
      {
        path:"userReview",
        name:"userReview",
        component:()=> import("@/views/ytq/UserReview.vue"),
        arr:["ytq","用户评价"]
      },
    ]
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
